int __init xlblk_init(void);
+void blkif_completion( blkif_request_t *req );
static inline int GET_ID_FROM_FREELIST( void )
{
//printk(KERN_ALERT"i: %d req %p (%ld)\n",i,req,id);
+ blkif_completion( &rec_ring[id] );
+
ADD_ID_TO_FREELIST(id); // overwrites req
switch ( bret->operation )
//printk("i: %d req %p (%ld)\n",i,bh,id);
+ blkif_completion( &rec_ring[id] );
+
ADD_ID_TO_FREELIST(id);
switch ( bret->operation )
memcpy(cmsg.msg, &st, sizeof(st));
ctrl_if_send_message_block(&cmsg, NULL, 0, TASK_UNINTERRUPTIBLE);
}
+
+/* XXXXX THIS IS A TEMPORARY FUNCTION UNTIL WE GET GRANT TABLES */
+
+void blkif_completion( blkif_request_t *req )
+{
+ int i;
+
+ switch ( req->operation )
+ {
+ case BLKIF_OP_READ:
+ for ( i = 0; i < req->nr_segments; i++ )
+ {
+ unsigned long pfn = req->frame_and_sects[i] >> PAGE_SHIFT;
+ unsigned long mfn = phys_to_machine_mapping[pfn];
+
+ queue_machphys_update(mfn, pfn);
+ }
+
+ break;
+ }
+
+}
+
+